Skip to content

ProcessID enhacement #8618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

johnbute
Copy link
Contributor

@johnbute johnbute commented May 5, 2025

Displays the PID of the SwiftPM instance currently holding the lock

Motivation:

Fixes #8528

Modifications:

Added a new abstraction for handling a .pid file which contains the pID of the currently running SwiftPM instance.

introduced the pidfileManipulator protocol and its implementation in pidFile struct to handle reading, writing, and deleting the PID file

Updated SwiftCommandState to use the pidFileManipulator to handle the pid file when attempting to acquire or release the lock.

Result:

Enhancement of knowing which processes are currently holding the lock + automatic cleanup

@johnbute johnbute marked this pull request as ready for review May 5, 2025 15:04
@johnbute johnbute marked this pull request as draft May 5, 2025 15:04
@johnbute
Copy link
Contributor Author

johnbute commented May 5, 2025

Still need to add tests + rename to something clearer. if you have any suggestions on naming, please let me know :)

@johnbute johnbute marked this pull request as ready for review May 7, 2025 14:54
@johnbute
Copy link
Contributor Author

johnbute commented May 7, 2025

@swift-ci please test

@johnbute
Copy link
Contributor Author

johnbute commented May 7, 2025

@swift-ci

@johnbute
Copy link
Contributor Author

johnbute commented May 7, 2025

@swift-ci please test

@johnbute johnbute marked this pull request as draft May 7, 2025 16:55
@johnbute johnbute force-pushed the feature/pid-enhancement branch from 0e93697 to 1963d73 Compare May 7, 2025 18:50
@johnbute johnbute marked this pull request as ready for review May 7, 2025 18:51
@johnbute
Copy link
Contributor Author

johnbute commented May 7, 2025

@swift-ci please test

@johnbute
Copy link
Contributor Author

johnbute commented May 7, 2025

@swift-ci please test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Display the process ID in the when running a Swift PM command that has a hold of the .build directory
1 participant